// File generated from our OpenAPI spec by Stainless.

package com.metest.api.services.blocking.rest.actuator

import com.google.errorprone.annotations.MustBeClosed
import com.metest.api.core.ClientOptions
import com.metest.api.core.RequestOptions
import com.metest.api.core.http.HttpResponseFor
import com.metest.api.models.rest.actuator.configprops.ConfigpropListParams
import com.metest.api.models.rest.actuator.configprops.ConfigpropListResponse
import com.metest.api.models.rest.actuator.configprops.ConfigpropRetrieveByPrefixParams
import com.metest.api.models.rest.actuator.configprops.ConfigpropRetrieveByPrefixResponse
import java.util.function.Consumer

interface ConfigpropService {

    /**
     * Returns a view of this service that provides access to raw HTTP responses for each method.
     */
    fun withRawResponse(): WithRawResponse

    /**
     * Returns a view of this service with the given option modifications applied.
     *
     * The original service is not modified.
     */
    fun withOptions(modifier: Consumer<ClientOptions.Builder>): ConfigpropService

    /** Actuator web endpoint 'configprops' */
    fun list(): ConfigpropListResponse = list(ConfigpropListParams.none())

    /** @see list */
    fun list(
        params: ConfigpropListParams = ConfigpropListParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): ConfigpropListResponse

    /** @see list */
    fun list(params: ConfigpropListParams = ConfigpropListParams.none()): ConfigpropListResponse =
        list(params, RequestOptions.none())

    /** @see list */
    fun list(requestOptions: RequestOptions): ConfigpropListResponse =
        list(ConfigpropListParams.none(), requestOptions)

    /** Actuator web endpoint 'configprops-prefix' */
    fun retrieveByPrefix(prefix: String): ConfigpropRetrieveByPrefixResponse =
        retrieveByPrefix(prefix, ConfigpropRetrieveByPrefixParams.none())

    /** @see retrieveByPrefix */
    fun retrieveByPrefix(
        prefix: String,
        params: ConfigpropRetrieveByPrefixParams = ConfigpropRetrieveByPrefixParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): ConfigpropRetrieveByPrefixResponse =
        retrieveByPrefix(params.toBuilder().prefix(prefix).build(), requestOptions)

    /** @see retrieveByPrefix */
    fun retrieveByPrefix(
        prefix: String,
        params: ConfigpropRetrieveByPrefixParams = ConfigpropRetrieveByPrefixParams.none(),
    ): ConfigpropRetrieveByPrefixResponse = retrieveByPrefix(prefix, params, RequestOptions.none())

    /** @see retrieveByPrefix */
    fun retrieveByPrefix(
        params: ConfigpropRetrieveByPrefixParams,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): ConfigpropRetrieveByPrefixResponse

    /** @see retrieveByPrefix */
    fun retrieveByPrefix(
        params: ConfigpropRetrieveByPrefixParams
    ): ConfigpropRetrieveByPrefixResponse = retrieveByPrefix(params, RequestOptions.none())

    /** @see retrieveByPrefix */
    fun retrieveByPrefix(
        prefix: String,
        requestOptions: RequestOptions,
    ): ConfigpropRetrieveByPrefixResponse =
        retrieveByPrefix(prefix, ConfigpropRetrieveByPrefixParams.none(), requestOptions)

    /** A view of [ConfigpropService] that provides access to raw HTTP responses for each method. */
    interface WithRawResponse {

        /**
         * Returns a view of this service with the given option modifications applied.
         *
         * The original service is not modified.
         */
        fun withOptions(
            modifier: Consumer<ClientOptions.Builder>
        ): ConfigpropService.WithRawResponse

        /**
         * Returns a raw HTTP response for `get /rest/actuator/configprops`, but is otherwise the
         * same as [ConfigpropService.list].
         */
        @MustBeClosed
        fun list(): HttpResponseFor<ConfigpropListResponse> = list(ConfigpropListParams.none())

        /** @see list */
        @MustBeClosed
        fun list(
            params: ConfigpropListParams = ConfigpropListParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): HttpResponseFor<ConfigpropListResponse>

        /** @see list */
        @MustBeClosed
        fun list(
            params: ConfigpropListParams = ConfigpropListParams.none()
        ): HttpResponseFor<ConfigpropListResponse> = list(params, RequestOptions.none())

        /** @see list */
        @MustBeClosed
        fun list(requestOptions: RequestOptions): HttpResponseFor<ConfigpropListResponse> =
            list(ConfigpropListParams.none(), requestOptions)

        /**
         * Returns a raw HTTP response for `get /rest/actuator/configprops/{prefix}`, but is
         * otherwise the same as [ConfigpropService.retrieveByPrefix].
         */
        @MustBeClosed
        fun retrieveByPrefix(prefix: String): HttpResponseFor<ConfigpropRetrieveByPrefixResponse> =
            retrieveByPrefix(prefix, ConfigpropRetrieveByPrefixParams.none())

        /** @see retrieveByPrefix */
        @MustBeClosed
        fun retrieveByPrefix(
            prefix: String,
            params: ConfigpropRetrieveByPrefixParams = ConfigpropRetrieveByPrefixParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): HttpResponseFor<ConfigpropRetrieveByPrefixResponse> =
            retrieveByPrefix(params.toBuilder().prefix(prefix).build(), requestOptions)

        /** @see retrieveByPrefix */
        @MustBeClosed
        fun retrieveByPrefix(
            prefix: String,
            params: ConfigpropRetrieveByPrefixParams = ConfigpropRetrieveByPrefixParams.none(),
        ): HttpResponseFor<ConfigpropRetrieveByPrefixResponse> =
            retrieveByPrefix(prefix, params, RequestOptions.none())

        /** @see retrieveByPrefix */
        @MustBeClosed
        fun retrieveByPrefix(
            params: ConfigpropRetrieveByPrefixParams,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): HttpResponseFor<ConfigpropRetrieveByPrefixResponse>

        /** @see retrieveByPrefix */
        @MustBeClosed
        fun retrieveByPrefix(
            params: ConfigpropRetrieveByPrefixParams
        ): HttpResponseFor<ConfigpropRetrieveByPrefixResponse> =
            retrieveByPrefix(params, RequestOptions.none())

        /** @see retrieveByPrefix */
        @MustBeClosed
        fun retrieveByPrefix(
            prefix: String,
            requestOptions: RequestOptions,
        ): HttpResponseFor<ConfigpropRetrieveByPrefixResponse> =
            retrieveByPrefix(prefix, ConfigpropRetrieveByPrefixParams.none(), requestOptions)
    }
}
